<% if IncludeFormTag %>
<form class="form-horizontal<% if $extraClass %> $extraClass<% end_if %>" $AttributesHTML role="form">
<% end_if %>
	<% if $Message %>
	<div id="{$FormName}_error" class="alert <% if $MessageType == 'success' %>alert-success<% else %>alert-danger<% end_if %>">
		<button type="button" class="close" data-dismiss="alert">&times;</button>
		$Message
	</div><% else %>
	<div id="{$FormName}_error" class="alert hide <% if $MessageType == 'success' %>alert-success<% else %>alert-danger<% end_if %>"></div><% end_if %>
    
    <fieldset><% if $Legend %>
		<legend>$Legend</legend><% end_if %><% loop $Fields %>
		<% if $class != DataListField %>$FieldHolder<% end_if %><% end_loop %>
	</fieldset>

    <% if $Actions %>
	<div class="form-actions form-group">
		<div class="col-sm-offset-3 col-md-offset-3 col-lg-offset-2 col-sm-6 col-md-6 col-sm-7">
			<% loop $Actions %>
				$Field
			<% end_loop %>
		</div>
	</div><% end_if %>
	
<% if IncludeFormTag %>
</form>
<% end_if %>
<br />
<result>
    <div id="{$FormName}_result" class="datalist-results">
        $Results
    </div>
</result>